/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dale2507.gates.gate.logic;

import dale2507.gates.Messenger;
import dale2507.gates.gate.Activator;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;

/**
 *
 * @author Dale
 */
public abstract class IActivatorLogic implements Runnable {
    
    private Activator activator;
    private CommandSender cs;
    
    public IActivatorLogic(Activator activator, CommandSender cs) {
        this.activator = activator;
        this.cs = cs;
    }
    
    protected Activator getActivator() {
        return this.activator;
    }
    
    public abstract void stop();
    
    protected void sendMessage(ChatColor color, String msg) {
        if (this.cs != null) Messenger.sendMessage(cs, color, msg);
    }
    
}
